package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsName  string  `gorm:"type:varchar(30);"`
	GoodsPrice float64 `gorm:"type:decimal(10,2)"`
}

func (g *Goods) Create() error {
	return DB.Debug().Create(&g).Error
}
func (g *Goods) FindGoods(goodsId int64) error {
	return DB.Debug().Where("ID=?", goodsId).Error
}
